# -*-coding: Utf-8 -*-
# @File : urls .py
# author: Chimengmeng
# blog_url : https://www.cnblogs.com/dream-ze/
# Time：2024/7/1
from django.urls import path, re_path
from rest_framework.routers import SimpleRouter

from apps.backend.views import GetUsername, RegisterView

router = SimpleRouter()

# 根据用户名返回用户信息
# router.register("", GetUsername, basename="user_get")

urlpatterns = [
    path("<str:username>/", GetUsername.as_view({
        "get": "search_user",
    }), name="user_get"),
    path("actual/<str:username>/", GetUsername.as_view({
        "get": "search_actual_user",
    }), name="user_get_actual"),
    path("has-username/<str:username>/", GetUsername.as_view({
        "get": "check_user_exist",
    }), name="user_check"),

]

urlpatterns += router.urls
